import { apiLogin } from "@/api/loginApi";

const login = {
    namespaced: true,
    state: {
        isNew: false,
        domId: []
    },
    mutations: {},
    actions: {
        apiLogin({ state }, data = {}) {
            return new Promise((resolve, reject) => {
                apiLogin(localStorage.getItem("x-url"), data).then(response => {
                    resolve(response.data)
                }).catch(error => {
                    reject(error)
                })
            })
        }
    }
}

export default login